<!--
 - Author : wang885298.
 - Date   : 2018/7/13.
 - File   : 3d.
 -->

<template>
        <el-container>
          <el-main>
            <div id="container"></div>
          </el-main>
        </el-container>
</template>

<script>
  export default {
    data() {
      return {
        msg: 'hello vue compoent!'
      }
    },
    mounted () {
      this.gadMap()
    },
    methods: {
      /**
       * 高德地图加载
       */
      gadMap () {
        let map = new AMap.Map('container', {
          zoom:11,//级别
          center: [116.397428, 39.90923],//中心点坐标
          viewMode:'3D'//使用3D视图
        })
        AMap.plugin('AMap.ToolBar',function(){
          let toolbar = new AMap.ToolBar()
          map.addControl(toolbar)
        })
      }
    }
  }
</script>

<style lang="less">
  #container {
    width: 100%;
    height: 100%;
  }
</style>
